/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package horizon.item;

import java.util.ArrayList;

/**
 *
 * @author J_Laptop
 */
public abstract class Storage {
    
    int capacity;
    int size;
    ArrayList<Item> items = new ArrayList<>();

    public Storage(int capacity) {
        this.capacity = capacity;
    }

    public boolean addItem(Item i){
        
        if(i.size <= (capacity - size)){
            
            items.add(i);
            return true;
            
        }
        else{
            
            return false;
            
        }
        
    }
    
    
    
    
}
